package com.choichumgming.rentcat.web.rpc;

import com.choichumgming.rentcat.common.api.CommonResult;
import com.choichumgming.rentcat.service.OmsOrderFeignApi;
import com.choichumgming.rentcat.service.OmsOrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@Api(tags = "OmsOrderFeignApiClient", description = "订单管理api接口")
@RequestMapping("/api")
public class OmsOrderFeignApiClient  implements OmsOrderFeignApi {
    @Autowired
    OmsOrderService omsOrderService;

    @Override
    @ApiOperation("更新订单状态")
    @RequestMapping(value = "/update/status")
    @ResponseBody
    public CommonResult updateOrderStatus(Long orderId, int status) {
        omsOrderService.updateOrderStatus(orderId, status);
        return CommonResult.success("成功更新");
    }
}
